import Vue from 'vue'
import App from './App'
import router from './router'
// 导入store
import store from './store'

// 导入 iview
import iView from 'iview';
import 'iview/dist/styles/iview.css';

// 导入 Vant
import Vant from 'vant';
import 'vant/lib/index.css';

// 公共less
import './less/common.less';

// 将this传入common
import {importVueThis} from './api/common'


require('./CommonComponents');

Vue.use(Vant);
Vue.use(iView);

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store: store,
  components: { App },
  template: '<App/>',
  mounted () {
    importVueThis(this)
    // 设置toast的位置为底部
    this.$toast.setDefaultOptions({
      position: "bottom"
    })
  }
})
